<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>测试getJSON</title>
    <script src="js/jquery-1.12.3.min.js"></script>
</head>
<body>

</body>
<script>
    //1.http协议，可以获取同域的json文件
    $.getJSON("json/test1.json", function (data) {
        console.log(data);
    });
    //2.不支持file协议
    $.getJSON("file:///E:/data/static/images/cannas/file/json/scit/20180510/scit_show_20180510071900.json", function (data) {
        console.log(data);
    });
    //3.nginx方向代理实现HTTP请求，不支持跨域
    $.getJSON("http://localhost:8099/images/cannas/file/json/scit/20180510/scit_show_20180510063300.json", function (data) {
        console.log(data);
    });
    //4.跨域时使用
    /*var url = nginxFilePath+"/file/json/scit/"+d.param;
     $.ajax({
     url:url,
     dataType:"jsonp",
     jsonpCallback:"scitData",//jsonp一定要这个回调
     success:function(data){
     showScitData(data);
     backupData(data,'netbar_scit');
     }
     });*/

</script>
</html>